3.129 \(\int \frac{\cos ^5(c+d x)}{(a+i a \tan (c+d x))^2} \, dx\)

Optimal. Leaf size=107 \[ -\frac{\sin ^7(c+d x)}{9 a^2 d}+\frac{7 \sin ^5(c+d x)}{15 a^2 d}-\frac{7 \sin ^3(c+d x)}{9 a^2 d}+\frac{7 \sin (c+d x)}{9 a^2 d}+\frac{2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )} \]

[Out]

(7*Sin[c + d*x])/(9*a^2*d) - (7*Sin[c + d*x]^3)/(9*a^2*d) + (7*Sin[c + d*x]^5)/(15*a^2*d) - Sin[c + d*x]^7/(9*
a^2*d) + (((2*I)/9)*Cos[c + d*x]^7)/(d*(a^2 + I*a^2*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0615628, antiderivative size = 107, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3500, 2633} \[ -\frac{\sin ^7(c+d x)}{9 a^2 d}+\frac{7 \sin ^5(c+d x)}{15 a^2 d}-\frac{7 \sin ^3(c+d x)}{9 a^2 d}+\frac{7 \sin (c+d x)}{9 a^2 d}+\frac{2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^5/(a + I*a*Tan[c + d*x])^2,x]

[Out]

(7*Sin[c + d*x])/(9*a^2*d) - (7*Sin[c + d*x]^3)/(9*a^2*d) + (7*Sin[c + d*x]^5)/(15*a^2*d) - Sin[c + d*x]^7/(9*
a^2*d) + (((2*I)/9)*Cos[c + d*x]^7)/(d*(a^2 + I*a^2*Tan[c + d*x]))

Rule 3500

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(2*d^2
*(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1))/(b*f*(m + 2*n)), x] - Dist[(d^2*(m - 2))/(b^2*(m + 2*n
)), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a
^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (Integers
Q[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps

\begin{align*} \int \frac{\cos ^5(c+d x)}{(a+i a \tan (c+d x))^2} \, dx &=\frac{2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}+\frac{7 \int \cos ^7(c+d x) \, dx}{9 a^2}\\ &=\frac{2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}-\frac{7 \operatorname{Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{9 a^2 d}\\ &=\frac{7 \sin (c+d x)}{9 a^2 d}-\frac{7 \sin ^3(c+d x)}{9 a^2 d}+\frac{7 \sin ^5(c+d x)}{15 a^2 d}-\frac{\sin ^7(c+d x)}{9 a^2 d}+\frac{2 i \cos ^7(c+d x)}{9 d \left (a^2+i a^2 \tan (c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.348066, size = 117, normalized size = 1.09 \[ \frac{i \sec ^2(c+d x) (-525 i \sin (c+d x)+567 i \sin (3 (c+d x))+75 i \sin (5 (c+d x))+7 i \sin (7 (c+d x))-1050 \cos (c+d x)+378 \cos (3 (c+d x))+30 \cos (5 (c+d x))+2 \cos (7 (c+d x)))}{2880 a^2 d (\tan (c+d x)-i)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^5/(a + I*a*Tan[c + d*x])^2,x]

[Out]

((I/2880)*Sec[c + d*x]^2*(-1050*Cos[c + d*x] + 378*Cos[3*(c + d*x)] + 30*Cos[5*(c + d*x)] + 2*Cos[7*(c + d*x)]
 - (525*I)*Sin[c + d*x] + (567*I)*Sin[3*(c + d*x)] + (75*I)*Sin[5*(c + d*x)] + (7*I)*Sin[7*(c + d*x)]))/(a^2*d
*(-I + Tan[c + d*x])^2)

________________________________________________________________________________________

Maple [B]  time = 0.092, size = 240, normalized size = 2.2 \begin{align*} 2\,{\frac{1}{{a}^{2}d} \left ({\frac{-i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{8}}}+{\frac{{\frac{51\,i}{32}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}+{\frac{{\frac{49\,i}{12}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{6}}}-{\frac{{\frac{35\,i}{8}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}+2/9\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-9}-5/2\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-7}+{\frac{49}{10\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{5}}}-{\frac{49}{16\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{3}}}+{\frac{99}{128\,\tan \left ( 1/2\,dx+c/2 \right ) -128\,i}}+{\frac{i/16}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{4}}}-{\frac{{\frac{9\,i}{64}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{2}}}+1/40\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-5}-{\frac{13}{96\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{3}}}+{\frac{29}{128\,\tan \left ( 1/2\,dx+c/2 \right ) +128\,i}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^2,x)

[Out]

2/d/a^2*(-I/(tan(1/2*d*x+1/2*c)-I)^8+51/32*I/(tan(1/2*d*x+1/2*c)-I)^2+49/12*I/(tan(1/2*d*x+1/2*c)-I)^6-35/8*I/
(tan(1/2*d*x+1/2*c)-I)^4+2/9/(tan(1/2*d*x+1/2*c)-I)^9-5/2/(tan(1/2*d*x+1/2*c)-I)^7+49/10/(tan(1/2*d*x+1/2*c)-I
)^5-49/16/(tan(1/2*d*x+1/2*c)-I)^3+99/128/(tan(1/2*d*x+1/2*c)-I)+1/16*I/(tan(1/2*d*x+1/2*c)+I)^4-9/64*I/(tan(1
/2*d*x+1/2*c)+I)^2+1/40/(tan(1/2*d*x+1/2*c)+I)^5-13/96/(tan(1/2*d*x+1/2*c)+I)^3+29/128/(tan(1/2*d*x+1/2*c)+I))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 2.3389, size = 329, normalized size = 3.07 \begin{align*} \frac{{\left (-9 i \, e^{\left (14 i \, d x + 14 i \, c\right )} - 105 i \, e^{\left (12 i \, d x + 12 i \, c\right )} - 945 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 1575 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 525 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 189 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 45 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i\right )} e^{\left (-9 i \, d x - 9 i \, c\right )}}{5760 \, a^{2} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^2,x, algorithm="fricas")

[Out]

1/5760*(-9*I*e^(14*I*d*x + 14*I*c) - 105*I*e^(12*I*d*x + 12*I*c) - 945*I*e^(10*I*d*x + 10*I*c) + 1575*I*e^(8*I
*d*x + 8*I*c) + 525*I*e^(6*I*d*x + 6*I*c) + 189*I*e^(4*I*d*x + 4*I*c) + 45*I*e^(2*I*d*x + 2*I*c) + 5*I)*e^(-9*
I*d*x - 9*I*c)/(a^2*d)

________________________________________________________________________________________

Sympy [A]  time = 1.72632, size = 301, normalized size = 2.81 \begin{align*} \begin{cases} \frac{\left (- 227994731135631360 i a^{14} d^{7} e^{30 i c} e^{5 i d x} - 2659938529915699200 i a^{14} d^{7} e^{28 i c} e^{3 i d x} - 23939446769241292800 i a^{14} d^{7} e^{26 i c} e^{i d x} + 39899077948735488000 i a^{14} d^{7} e^{24 i c} e^{- i d x} + 13299692649578496000 i a^{14} d^{7} e^{22 i c} e^{- 3 i d x} + 4787889353848258560 i a^{14} d^{7} e^{20 i c} e^{- 5 i d x} + 1139973655678156800 i a^{14} d^{7} e^{18 i c} e^{- 7 i d x} + 126663739519795200 i a^{14} d^{7} e^{16 i c} e^{- 9 i d x}\right ) e^{- 25 i c}}{145916627926804070400 a^{16} d^{8}} & \text{for}\: 145916627926804070400 a^{16} d^{8} e^{25 i c} \neq 0 \\\frac{x \left (e^{14 i c} + 7 e^{12 i c} + 21 e^{10 i c} + 35 e^{8 i c} + 35 e^{6 i c} + 21 e^{4 i c} + 7 e^{2 i c} + 1\right ) e^{- 9 i c}}{128 a^{2}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**5/(a+I*a*tan(d*x+c))**2,x)

[Out]

Piecewise(((-227994731135631360*I*a**14*d**7*exp(30*I*c)*exp(5*I*d*x) - 2659938529915699200*I*a**14*d**7*exp(2
8*I*c)*exp(3*I*d*x) - 23939446769241292800*I*a**14*d**7*exp(26*I*c)*exp(I*d*x) + 39899077948735488000*I*a**14*
d**7*exp(24*I*c)*exp(-I*d*x) + 13299692649578496000*I*a**14*d**7*exp(22*I*c)*exp(-3*I*d*x) + 47878893538482585
60*I*a**14*d**7*exp(20*I*c)*exp(-5*I*d*x) + 1139973655678156800*I*a**14*d**7*exp(18*I*c)*exp(-7*I*d*x) + 12666
3739519795200*I*a**14*d**7*exp(16*I*c)*exp(-9*I*d*x))*exp(-25*I*c)/(145916627926804070400*a**16*d**8), Ne(1459
16627926804070400*a**16*d**8*exp(25*I*c), 0)), (x*(exp(14*I*c) + 7*exp(12*I*c) + 21*exp(10*I*c) + 35*exp(8*I*c
) + 35*exp(6*I*c) + 21*exp(4*I*c) + 7*exp(2*I*c) + 1)*exp(-9*I*c)/(128*a**2), True))

________________________________________________________________________________________

Giac [B]  time = 1.16242, size = 266, normalized size = 2.49 \begin{align*} \frac{\frac{3 \,{\left (435 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 1470 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 2060 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1330 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 353\right )}}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}^{5}} + \frac{4455 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{8} - 26460 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} - 78120 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} + 137340 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 157374 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 118356 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 57744 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 16596 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 2339}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{9}}}{2880 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^2,x, algorithm="giac")

[Out]

1/2880*(3*(435*tan(1/2*d*x + 1/2*c)^4 + 1470*I*tan(1/2*d*x + 1/2*c)^3 - 2060*tan(1/2*d*x + 1/2*c)^2 - 1330*I*t
an(1/2*d*x + 1/2*c) + 353)/(a^2*(tan(1/2*d*x + 1/2*c) + I)^5) + (4455*tan(1/2*d*x + 1/2*c)^8 - 26460*I*tan(1/2
*d*x + 1/2*c)^7 - 78120*tan(1/2*d*x + 1/2*c)^6 + 137340*I*tan(1/2*d*x + 1/2*c)^5 + 157374*tan(1/2*d*x + 1/2*c)
^4 - 118356*I*tan(1/2*d*x + 1/2*c)^3 - 57744*tan(1/2*d*x + 1/2*c)^2 + 16596*I*tan(1/2*d*x + 1/2*c) + 2339)/(a^
2*(tan(1/2*d*x + 1/2*c) - I)^9))/d